package net.jalbum.editor;

import java.beans.Beans;
import java.io.File;

/**
 *
 * @author david
 */
public class Main {
    
    static boolean runsStandalone = false;

    public static boolean isMac() {
        return System.getProperty("mrj.version") != null;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        runsStandalone = true;
        // Do Mac specific stuff
        if (isMac()) {
            try {
                // Just create the special mac support, it will do all the work
                Beans.instantiate(Main.class.getClassLoader(), "net.jalbum.editor.SpecialMacHandler");
            } catch (Exception ex) {
                System.err.println("Failed to load extended Mac support: " + ex.getMessage());
            }
        }

        if (args.length == 0) {
            JTextPad app = new JTextPad();
            app.setVisible(true);
        } else {
            for (String s : args) {
                //JTextPad.getEditor(new File(s));
            }
        }
    }
}